package com.puccampinas.finalproject.core.persistence.entity;

import java.io.Serializable;
import java.util.Date;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import org.apache.commons.lang3.builder.ToStringBuilder;

@XmlType(name = "user")
@XmlRootElement(name = "user")
@XmlAccessorType(XmlAccessType.FIELD)
public class User implements Serializable {
	
	private static final long serialVersionUID = 7615237651238L;

	@XmlElement
	private Long id;
	
	@XmlElement(name = "apelido")
	private String username;
	
	@XmlElement(name = "senha")
	private String password;
	
	@XmlElement(name = "perfil")
	private String profile;
	
	@XmlElement(name = "email")
	private String email;
	
	@XmlElement(name = "foto")
	private String photo;
	
	@XmlElement(name = "data_criacao")
	private Date creationDate;
	
	public User() {
		this.photo = "http://tcc.renanwilliam.com/wp-content/uploads/2012/11/no_image-60x60.jpg";
	}
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getProfile() {
		return profile;
	}
	public void setProfile(String perfil) {
		this.profile = perfil;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPhoto() {
		return photo;
	}
	public void setPhoto(String photo) {
		this.photo = photo;
	}
	public Date getCreationDate() {
		return creationDate;
	}
	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}
	
	@Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
